package com.jqk.shopuser.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:jiangqikun
 * @Date:2022/3/3 14:12
 **/

@RestController
//不加此注解，改完之后需要重启,通过cglib 代理类回调钩子函数
@RefreshScope
public class TestController {

    @Value("${test.appName}")
    private String appName;

    @GetMapping("/user/test")
    public String test(){
        return  appName;
    }
}
